package com.sojson.project.dao.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Repository;

import com.sojson.base.impl.BaseDaoImpl;
import com.sojson.project.dao.CouponStoreDao;
import com.sojson.project.entity.po.CouponStore;

/**
 * 券可用店铺Dao实现类(目的:把分页插件从Service层分离,这样就不用每次调Dao接口都要分页)
 * 
 * @author liu
 * @date 2021-06-02
 */
@Repository
public class CouponStoreDaoImpl extends BaseDaoImpl<CouponStoreDao, CouponStore> implements CouponStoreDao {

    @Resource
    private CouponStoreDao couponStoreDao;

    /**
     * 单条插入
     * 
     * @param couponStore
     * @return
     */
    @Override
    public int insert(CouponStore couponStore) {
        return couponStoreDao.insert(couponStore);
    }

    /**
     * 批量插入
     * 
     * @param couponStore
     * @return
     */
    @Override
    public int insertList(List<CouponStore> couponStores) {
        return couponStoreDao.insertList(couponStores);
    }

    /**
     * 通过对象批量删除(物理删除)
     * 
     * @param couponStore
     * @return
     */
    @Override
    public int deleteByDto(CouponStore couponStore) {
        return couponStoreDao.deleteByDto(couponStore);
    }

    /**
     * 统计全部数量
     * 
     * @return
     */
    @Override
    public int countAll() {
        return couponStoreDao.countAll();
    }

    /**
     * 查询所有
     * 
     * @return
     */
    @Override
    public List<CouponStore> listAll() {
        return couponStoreDao.listAll();
    }

    /**
     * 根据对象统计数量
     * 
     * @param couponStore
     * @return
     */
    @Override
    public int countByDto(CouponStore couponStore) {
        return couponStoreDao.countByDto(couponStore);
    }

    /**
     * 根据对象查询
     * 
     * @param couponStore
     * @return
     */
    @Override
    public List<CouponStore> listByDto(CouponStore couponStore) {
        startPage(couponStore);
        return couponStoreDao.listByDto(couponStore);
    }

    /**
     * 通过id删除(物理删除)
     * 
     * @param id
     * @return
     */
    @Override
    public int deleteById(Integer id) {
        return couponStoreDao.deleteById(id);
    }

    /**
     * 通过id数组删除(物理删除)
     * 
     * @param ids
     * @return
     */
    @Override
    public int deleteByIds(Integer[] ids) {
        return couponStoreDao.deleteByIds(ids);
    }

    /**
     * 通过id更新(全部更新)
     * 
     * @param couponStore
     * @return
     */
    @Override
    public int updateAllById(CouponStore couponStore) {
        return couponStoreDao.updateAllById(couponStore);
    }

    /**
     * 通过id列表更新(全部更新)(更新内容相同)
     * 
     * @param couponStore
     * @return
     */
    @Override
    public int updateAllByIdList(CouponStore couponStore) {
        return couponStoreDao.updateAllByIdList(couponStore);
    }

    /**
     * 通过id列表更新(全部更新)(更新内容不相同)
     * 
     * @param couponStores
     * @return
     */
    @Override
    public int updateDtoListAllById(List<CouponStore> couponStores) {
        return couponStoreDao.updateDtoListAllById(couponStores);
    }

    /**
     * 通过id更新(局部更新)
     * 
     * @param couponStore
     * @return
     */
    @Override
    public int updateById(CouponStore couponStore) {
        return couponStoreDao.updateById(couponStore);
    }

    /**
     * 通过id列表更新(局部更新)(更新内容相同)
     * 
     * @param couponStore
     * @return
     */
    @Override
    public int updateByIdList(CouponStore couponStore) {
        return couponStoreDao.updateByIdList(couponStore);
    }

    /**
     * 通过id列表更新(局部更新)(更新内容不相同)
     * 
     * @param couponStores
     * @return
     */
    @Override
    public int updateDtoListById(List<CouponStore> couponStores) {
        return couponStoreDao.updateDtoListById(couponStores);
    }

    /**
     * 通过id查询
     * 
     * @param id
     * @return
     */
    @Override
    public CouponStore findById(Integer id) {
        return couponStoreDao.findById(id);
    }

    /**
     * 通过id数组查询
     * 
     * @param ids
     * @return
     */
    @Override
    public List<CouponStore> findByIds(Integer[] ids) {
        return couponStoreDao.findByIds(ids);
    }

    /**
     * 通过对象查询id列表
     * 
     * @param couponStore
     * @return
     */
    @Override
    public List<Integer> findIdByDto(CouponStore couponStore) {
        startPage(couponStore);
        return couponStoreDao.findIdByDto(couponStore);
    }

    /**
     * 清空数据(物理清空)
     */
    @Override
    public int clear() {
        return couponStoreDao.clear();
    }

    /**
     * 批量插入
     * 
     * @param couponStore
     * @return
     */
    @Override
    public int insertAll(CouponStore couponStore) {
        return couponStoreDao.insertAll(couponStore);
    }

    /**
     * 根据对象查询
     * 
     * @param couponStore
     * @return
     */
    @Override
    public List<CouponStore> list(CouponStore couponStore) {
        startPage(couponStore);
        return couponStoreDao.list(couponStore);
    }

}